﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c="clr-namespace:TFSWorkflowControl.TeamExplorer.WPF"
	mc:Ignorable="d"
	x:Class="TFSWorkflowControl.TeamExplorer.WPF.WIStateControl"
	x:Name="UserControl"
	d:DesignWidth="640" d:DesignHeight="480" Height="149" Width="113">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Themes\ItemsDictionary.xaml" />
                <ResourceDictionary>
                    <ObjectDataProvider  x:Key="stateCollection" ObjectType="{x:Type c:StateInfoCollection}">
                    </ObjectDataProvider>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel Background="White">
        <StackPanel Orientation="Horizontal" Margin="4" >
            <TextBlock Text="Group by : " VerticalAlignment="Center"/>
            <ComboBox x:Name="cbGroup" SelectionChanged="cbGroup_SelectionChanged" VerticalAlignment="Center">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </StackPanel>
        <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  Background="White">
            <ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Hidden" Margin="0,5,0,5">
                <ItemsControl ScrollViewer.CanContentScroll="True"  DataContext="{StaticResource stateCollection}" ItemsSource="{Binding}"  ItemsPanel="{StaticResource ItemsPanelTemplate}" Focusable="True" IsHitTestVisible="True" />
            </ScrollViewer>
        </Grid>
    </StackPanel>
</UserControl>